﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace TAMSUP
{
    /// <summary>
    /// Interaction logic for KonfigurasiTanggal.xaml
    /// </summary>
    public partial class KonfigurasiTanggal : Window
    {
        public KonfigurasiTanggal()
        {
            InitializeComponent();
        }

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            for (int i = 7; i <= 30; i++)
            {
                comboBox1.Items.Add(i);
            }
            comboBox1.SelectedItem = (object)homeWindow.top.time;
        }

        private void addButton_Click(object sender, RoutedEventArgs e)
        {
            homeWindow.top.time = Int32.Parse(comboBox1.SelectedItem.ToString());
        }

        private void cancelButton_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
        }

        private void formWindow_Closed(object sender, EventArgs e)
        {
            homeWindow.top.Focus();
            homeWindow.top.Visibility = System.Windows.Visibility.Visible;
        }
    }
}
